mod_proxy+mod_rewrite: hiding redirection
mod_proxy+mod_rewrite: hiding redirection
am 27.10.2009 22:55:41 von 8p
I'm using mod_proxy/mod_rewrite to redirect requests to a specific
script which handles them. For example:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^123.123.123.123 [NC]
RewriteRule $(.+) http://123.123.123.123/myscript?url=%{REQUEST_URI}
This is working great. The question is, can I hide that redirection
(http://123.123.123.123/myscript?url=thewebsite.com) and keep the
requested url in the address bar somehow?
Regards,
Marcos
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: mod_proxy+mod_rewrite: hiding redirection
am 28.10.2009 01:47:27 von Igor Cicimov
--00151743f9228bf6760476f423d8
Content-Type: text/plain; charset=ISO-8859-1
Try playing with the P,R,L flags in the rewrite rule and see what happens :)
e.g.
RewriteRule $(.+)
http://123.123.123.123/myscript?url=%{REQUEST_URI}[P,R,L]
or
RewriteRule $(.+)
http://123.123.123.123/myscript?url=%{REQUEST_URI}[R,L]
or
RewriteRule $(.+)
http://123.123.123.123/myscript?url=%{REQUEST_URI}[P,L]
Cheers,
Igor
On Wed, Oct 28, 2009 at 8:55 AM, Marcos Mendez wrote:
> I'm using mod_proxy/mod_rewrite to redirect requests to a specific
> script which handles them. For example:
>
>
> RewriteEngine on
> RewriteCond %{HTTP_HOST} !^123.123.123.123 [NC]
> RewriteRule $(.+) http://123.123.123.123/myscript?url=%{REQUEST_URI}
>
>
> This is working great. The question is, can I hide that redirection
> (http://123.123.123.123/myscript?url=thewebsite.com) and keep the
> requested url in the address bar somehow?
>
> Regards,
>
> Marcos
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--00151743f9228bf6760476f423d8
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Try playing with the P,R,L flags in the rewrite rule and see what happens :=
)
e.g.
RewriteRule $(.+)
pt?url=3D%%7BREQUEST_URI%7D" target=3D"_blank">http://123.123.123.123/myscr=
ipt?url=3D%{REQUEST_URI} [P,R,L]
or
RewriteRule $(.+)
7BREQUEST_URI%7D" target=3D"_blank">http://123.123.123.123/myscript?url=3D%=
{REQUEST_URI} [R,L]
or
RewriteRule $(.+)
3.123.123/myscript?url=3D%%7BREQUEST_URI%7D" target=3D"_blank">http://123.1=
23.123.123/myscript?url=3D%{REQUEST_URI} [P,L]
Cheers,
Igor
On Wed, Oct 28, 2=
009 at 8:55 AM, Marcos Mendez
<
srmendez@gmail.com">marcosrmendez@gmail.com> wrote:
quote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 2=
04); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm using mod_proxy/mod_rewrite to redirect requests to a specific
script which handles them. For example:
<Proxy *>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^123.123.123.123 [NC]
RewriteRule $(.+)
EST_URI%7D" target=3D"_blank">http://123.123.123.123/myscript?url=3D%{RE QUE=
ST_URI}
</Proxy>
This is working great. The question is, can I hide that redirection
(
"_blank">http://123.123.123.123/myscript?url=3Dthewebsite.co m) and keep=
the
requested url in the address bar somehow?
Regards,
Marcos
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.<=
br>
See <URL:
lank">http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail:
g">users-unsubscribe@httpd.apache.org
=A0 " =A0 from the digest:
@httpd.apache.org">users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail:
org">users-help@httpd.apache.org
--00151743f9228bf6760476f423d8--
Re: mod_proxy+mod_rewrite: hiding redirection
am 28.10.2009 05:09:00 von 8p
On Tue, Oct 27, 2009 at 8:47 PM, Igor Cicimov wrote:
> Try playing with the P,R,L flags in the rewrite rule and see what happens=
:)
> e.g.
>
> RewriteRule $(.+) http://123.123.123.123/myscript?url=3D%{REQUEST_URI} [P=
,R,L]
> or
> RewriteRule $(.+) http://123.123.123.123/myscript?url=3D%{REQUEST_URI} [R=
,L]
> or
> RewriteRule $(.+) http://123.123.123.123/myscript?url=3D%{REQUEST_URI} [P=
,L]
>
> Cheers,
>
> Igor
>
> On Wed, Oct 28, 2009 at 8:55 AM, Marcos Mendez
> wrote:
>>
>> I'm using mod_proxy/mod_rewrite to redirect requests to a specific
>> script which handles them. For example:
>>
>>
>> RewriteEngine on
>> RewriteCond %{HTTP_HOST} !^123.123.123.123 [NC]
>> RewriteRule $(.+) http://123.123.123.123/myscript?url=3D%{REQUEST_URI}
>>
>>
>> This is working great. The question is, can I hide that redirection
>> (http://123.123.123.123/myscript?url=3Dthewebsite.com) and keep the
>> requested url in the address bar somehow?
>>
>> Regards,
>>
>> Marcos
>>
>> ------------------------------------------------------------ ---------
>> The official User-To-User support forum of the Apache HTTP Server Projec=
t.
>> See for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> =A0 " =A0 from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
>
Tried all of them. Looks the same from the browser. Maybe I'm missing somet=
hing?
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: mod_proxy+mod_rewrite: hiding redirection
am 28.10.2009 05:22:01 von Igor Cicimov
--000e0cd58ef8ed3a220476f72244
Content-Type: text/plain; charset=ISO-8859-1
What if you remove the handle? As it is written now I don't see
any particular need for it?
On Wed, Oct 28, 2009 at 3:09 PM, Marcos Mendez wrote:
> On Tue, Oct 27, 2009 at 8:47 PM, Igor Cicimov wrote:
> > Try playing with the P,R,L flags in the rewrite rule and see what happens
> :)
> > e.g.
> >
> > RewriteRule $(.+) http://123.123.123.123/myscript?url=%{REQUEST_URI}[P,R,L]
> > or
> > RewriteRule $(.+) http://123.123.123.123/myscript?url=%{REQUEST_URI}[R,L]
> > or
> > RewriteRule $(.+) http://123.123.123.123/myscript?url=%{REQUEST_URI}[P,L]
> >
> > Cheers,
> >
> > Igor
> >
> > On Wed, Oct 28, 2009 at 8:55 AM, Marcos Mendez
> > wrote:
> >>
> >> I'm using mod_proxy/mod_rewrite to redirect requests to a specific
> >> script which handles them. For example:
> >>
> >>
> >> RewriteEngine on
> >> RewriteCond %{HTTP_HOST} !^123.123.123.123 [NC]
> >> RewriteRule $(.+) http://123.123.123.123/myscript?url=%{REQUEST_URI}
> >>
> >>
> >> This is working great. The question is, can I hide that redirection
> >> (http://123.123.123.123/myscript?url=thewebsite.com) and keep the
> >> requested url in the address bar somehow?
> >>
> >> Regards,
> >>
> >> Marcos
> >>
> >> ------------------------------------------------------------ ---------
> >> The official User-To-User support forum of the Apache HTTP Server
> Project.
> >> See for more info.
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >> " from the digest: users-digest-unsubscribe@httpd.apache.org
> >> For additional commands, e-mail: users-help@httpd.apache.org
> >>
> >
> >
>
> Tried all of them. Looks the same from the browser. Maybe I'm missing
> something?
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--000e0cd58ef8ed3a220476f72244
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
What if you remove the <Proxy *> handle? As it is written now I don=
39;t see any particular need for it?
On W=
ed, Oct 28, 2009 at 3:09 PM, Marcos Mendez
<
"mailto:marcosrmendez@gmail.com">marcosrmendez@gmail.com> wro=
te:
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<=
div class=3D"h5">On Tue, Oct 27, 2009 at 8:47 PM, Igor Cicimov <
=3D"mailto:icicimov@gmail.com">icicimov@gmail.com> wrote:
> Try playing with the P,R,L flags in the rewrite rule and see what happ=
ens :)
> e.g.
>
> RewriteRule $(.+)
BREQUEST_URI%7D" target=3D"_blank">http://123.123.123.123/myscript?url=3D%{=
REQUEST_URI} [P,R,L]
> or
> RewriteRule $(.+)
BREQUEST_URI%7D" target=3D"_blank">http://123.123.123.123/myscript?url=3D%{=
REQUEST_URI} [R,L]
> or
> RewriteRule $(.+)
BREQUEST_URI%7D" target=3D"_blank">http://123.123.123.123/myscript?url=3D%{=
REQUEST_URI} [P,L]
>
> Cheers,
>
> Igor
>
> On Wed, Oct 28, 2009 at 8:55 AM, Marcos Mendez <
arcosrmendez@gmail.com">marcosrmendez@gmail.com>
> wrote:
>>
>> I'm using mod_proxy/mod_rewrite to redirect requests to a spec=
ific
>> script which handles them. For example:
>>
>> <Proxy *>
>> RewriteEngine on
>> RewriteCond %{HTTP_HOST} !^123.123.123.123 [NC]
>> RewriteRule $(.+)
=3D%%7BREQUEST_URI%7D" target=3D"_blank">http://123.123.123.123/myscript?ur=
l=3D%{REQUEST_URI}
>> </Proxy>
>>
>> This is working great. The question is, can I hide that redirectio=
n
>> (
target=3D"_blank">http://123.123.123.123/myscript?url=3Dthew ebsite.com)=
and keep the
>> requested url in the address bar somehow?
>>
>> Regards,
>>
>> Marcos
>>
>> ------------------------------------------------------------ ------=
---
>> The official User-To-User support forum of the Apache HTTP Server =
Project.
>> See <URL:
get=3D"_blank">http://httpd.apache.org/userslist.html> for more info=
..
>> To unsubscribe, e-mail:
apache.org">users-unsubscribe@httpd.apache.org
>> =A0 " =A0 from the digest:
ubscribe@httpd.apache.org">users-digest-unsubscribe@httpd.ap ache.org
>
>> For additional commands, e-mail:
d.apache.org">users-help@httpd.apache.org
>>
>
>
Tried all of them. Looks the same from the browser. Maybe I'=
;m missing something?
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.<=
br>
See <URL:
lank">http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail:
g">users-unsubscribe@httpd.apache.org
=A0 " =A0 from the digest:
@httpd.apache.org">users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail:
org">users-help@httpd.apache.org
--000e0cd58ef8ed3a220476f72244--
Re: mod_proxy+mod_rewrite: hiding redirection
am 28.10.2009 13:43:57 von Krist van Besien
On Tue, Oct 27, 2009 at 10:55 PM, Marcos Mendez wrote:
> I'm using mod_proxy/mod_rewrite to redirect requests to a specific
> script which handles them. For example:
>
>
> RewriteEngine on
> RewriteCond %{HTTP_HOST} !^123.123.123.123 [NC]
> RewriteRule $(.+) http://123.123.123.123/myscript?url=%{REQUEST_URI}
>
>
> This is working great. The question is, can I hide that redirection
> (http://123.123.123.123/myscript?url=thewebsite.com) and keep the
> requested url in the address bar somehow?
Just add the [P] flag to your RewriteRule (and only the P flag...)
Krist
--
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: mod_proxy+mod_rewrite: hiding redirection
am 28.10.2009 13:56:27 von 8p
On Wed, Oct 28, 2009 at 8:43 AM, Krist van Besien
wrote:
> On Tue, Oct 27, 2009 at 10:55 PM, Marcos Mendez =
wrote:
>> I'm using mod_proxy/mod_rewrite to redirect requests to a specific
>> script which handles them. For example:
>>
>>
>> RewriteEngine on
>> RewriteCond %{HTTP_HOST} !^123.123.123.123 [NC]
>> RewriteRule $(.+) http://123.123.123.123/myscript?url=3D%{REQUEST_URI}
>>
>>
>> This is working great. The question is, can I hide that redirection
>> (http://123.123.123.123/myscript?url=3Dthewebsite.com) and keep the
>> requested url in the address bar somehow?
>
> Just add the [P] flag to your RewriteRule (and only the P flag...)
>
> Krist
>
>
>
>
> --
> krist.vanbesien@gmail.com
> krist@vanbesien.org
> Bremgarten b. Bern, Switzerland
> --
> A: It reverses the normal flow of conversation.
> Q: What's wrong with top-posting?
> A: Top-posting.
> Q: What's the biggest scourge on plain text email discussions?
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project=
..
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> =A0 " =A0 from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Still no joy. Let me post my whole proxy.conf and site.conf....
ProxyRequests On
NoProxy .somedomain.com 172.16.1.29
RewriteEngine on
RewriteCond %{HTTP_HOST} !^172.16.1.29 [NC]
RewriteRule ^(.+)$
http://172.16.1.29/script.cgi/browse?URL=3D%{REQUEST_URI} [P]
Order allow, deny
Allow from all
ProxyVia Off
I've tried changing the rewriterule flags as suggested [P,R,L], [R,L],
[P,L], [P], but I still see the redirect in the address bar. Also the
cgi script is being hosted in a virtual host on the same machine.
ServerAdmin webmaster@localhost
AddHandler cgi-script .cgi
DocumentRoot /var/www
Options FollowSymLinks
AllowOverride None
Options +ExecCGI
AllowOverride None
Order allow,deny
allow from all
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org